home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
gnu
/
fpu881
/
src6.zoo
/
sscanf.c
< prev
next >
Wrap
C/C++ Source or Header
|
1991-09-24
|
413b
|
28 lines
#define __SRC__ /* fake prototypes */
#include <stdio.h>
static int sgetc(s)
unsigned char **s;
{
register unsigned char c;
c = *(*s)++;
return((c == '\0') ? EOF : c);
}
static int sungetc(c, s)
int c;
unsigned char **s;
{
if(c == EOF)
c = '\0';
return(*--(*s) = c);
}
sscanf(buf, fmt, arg)
const char *buf, *fmt;
int arg;
{
return(_scanf(&buf, sgetc, sungetc, fmt, &arg));
}